<template>
    <table class="table">

        <thead>
            <tr><td>编号</td><td>名称</td><td>价格</td><td>操作 </td></tr>

        </thead>
        <tbody>
            <tr v-for="item in prodList" :key="item.id">
                <td>{{item.id}}</td>
                <td>{{item.name}}</td>
                <td> &yen; {{item.price|priceFormat}}  </td>
                <td><button v-on:click="doDelete(item.id)">删除</button></td>
            </tr>
        </tbody>
     </table>
</template>
<script>
export default {
    props:["prodList"],
    methods:{
        doDelete:function(val){
this.$emit("del",val);
        }
    }
}
</script>